package com.zhuss.bean.bo.order.order;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;

import com.zhuss.common.BaseBo;
import com.zhuss.common.IdBo;
import com.zhuss.enums.OrderStatus;
/**
 * @description: 订单明细创建bo
 * @author: zhushanshuo
 * @create: Tue Jan 12 13:51:36 CST 2021
 **/
public class CreateOrderItemBo extends IdBo  implements Serializable, BaseBo {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = (long)(Math.random() * 2000000000000000000L);
	
    private Long orderId;     //订单ID

    private Long lineStrategyId;     //买票的线路策略ID，即商品ID

    private Long trainId;     //买票的具体车次ID，即具体日期的商品ID
    
    private String startTime;     //发车时间
    
    private Long onSiteId;     //上车点

    private String onSiteName;     //上车点名称

    private Date onSiteTime;     //上车点时间

    private Long offSiteId;     //下车点

    private String offSiteName;     //下车点名称

    private Date offSiteTime;     //下车点时间
    
    private Integer personNum = 1;     //乘坐人数

    private Long price;     //单价， 单位：分

    private Long refundPrice = 0l;     //已退回的金额， 单位：分

    private Long refundPercent = 0l;     //已退回的比例， 单位：%

    private Date date;     //日期明细

    private Integer status = OrderStatus.未支付.key();     //订单状态
    
    private Date createTime;



    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
	}

    public Long getLineStrategyId() {
        return lineStrategyId;
    }

    public void setLineStrategyId(Long lineStrategyId) {
        this.lineStrategyId = lineStrategyId;
	}

    public Long getTrainId() {
        return trainId;
    }

    public void setTrainId(Long trainId) {
        this.trainId = trainId;
	}

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
	}
    
    public Long getOnSiteId() {
		return onSiteId;
	}

	public void setOnSiteId(Long onSiteId) {
		this.onSiteId = onSiteId;
	}

	public String getOnSiteName() {
		return onSiteName;
	}

	public void setOnSiteName(String onSiteName) {
		this.onSiteName = onSiteName;
	}

	public Date getOnSiteTime() {
		return onSiteTime;
	}

	public void setOnSiteTime(String onSiteTime) {
		String[] strList = onSiteTime.split(":");
		Calendar cal = Calendar.getInstance();
		cal.setTime(date);
		cal.set(Calendar.HOUR, Integer.valueOf(strList[0]));
		cal.set(Calendar.MINUTE, Integer.valueOf(strList[1]));
		cal.set(Calendar.SECOND, 0);
		cal.set(Calendar.MILLISECOND, 0);
		this.onSiteTime = cal.getTime();
	}

	public Long getOffSiteId() {
		return offSiteId;
	}

	public void setOffSiteId(Long offSiteId) {
		this.offSiteId = offSiteId;
	}

	public String getOffSiteName() {
		return offSiteName;
	}

	public void setOffSiteName(String offSiteName) {
		this.offSiteName = offSiteName;
	}

	public Date getOffSiteTime() {
		return offSiteTime;
	}

	public void setOffSiteTime(String offSiteTime) {
		String[] strList = offSiteTime.split(":");
		Calendar cal = Calendar.getInstance();
		cal.setTime(date);
		cal.set(Calendar.HOUR, Integer.valueOf(strList[0]));
		cal.set(Calendar.MINUTE, Integer.valueOf(strList[1]));
		cal.set(Calendar.SECOND, 0);
		cal.set(Calendar.MILLISECOND, 0);
		this.offSiteTime = cal.getTime();
	}
	
	public Integer getPersonNum() {
		return personNum;
	}
	
	public void setPersonNum(Integer personNum) {
		this.personNum = personNum;
	}

	public Long getPrice() {
        return price;
    }

    public void setPrice(Long price) {
        this.price = price;
	}

    public Long getRefundPrice() {
        return refundPrice;
    }

    public void setRefundPrice(Long refundPrice) {
        this.refundPrice = refundPrice;
	}

    public Long getRefundPercent() {
        return refundPercent;
    }

    public void setRefundPercent(Long refundPercent) {
        this.refundPercent = refundPercent;
	}

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
	}

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
	}
    
    public Date getCreateTime() {
		return createTime;
	}
    
    public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}


}
